﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ElencoNews.aspx.vb" Inherits="TecnoHouse.ElencoNews" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function() {
            var skipLimit = 0;
            var getnews = function(){ 
                $.getJSON("/BLL/hndNews.ashx", { op: "GetLastNews",skipLimit: skipLimit, takeLimit: <%=newsBoxLimit %> },
                   function(data) {
                       if (data != "0") {
                            $.tmpl("news", data).appendTo("#elenconews");
                            skipLimit += <%=newsBoxLimit %>;
                       }
                   }
               );
            };
            
            getnews();
            
            $("#btnmore").click(function(){
                getnews();    
            });
            $(".loading").ajaxStart(function(){
                $(this).fadeIn();
            }).ajaxStop(function(){
                $(this).fadeOut();
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
    <h3><span class="icon news"></span><span><%=pageTitle %> <em>-</em></span>Elenco News</h3>
    <ul id="elenconews">
        
    </ul>
    <div class="clearer" style="height: 30px;">
        <span class="loading">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attendere...</span>
    </div>
    <a id="btnmore" href="#" class="fg-button fg-button-icon-left ui-state-default ui-corner-all">
       <span class="ui-icon ui-icon-signal-diag"></span>carica altre news</a>
</asp:Content>
